package com.mroapp.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.mroapp.R;
import com.mroapp.activity.AboutMroRobotActivity;
import com.mroapp.activity.RecruitActivity;

public class SetFragment extends Fragment implements View.OnClickListener {
    private TextView  title_name;
    private RelativeLayout layout_recruit;
    private RelativeLayout layout_version;
    private RelativeLayout layout_about_mrorobot;
    private RelativeLayout layout_logout;
    private RelativeLayout layout_cleancache;


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View view=inflater.inflate(R.layout.fragment_set,container,false);
        title_name=(TextView)view.findViewById(R.id.title_name);
        title_name.setText("设置");
        initView(view);
        return view;
    }

    public void initView(View view){
        layout_recruit=(RelativeLayout)view.findViewById(R.id.layout_cruit);
        layout_recruit.setOnClickListener(this);
        layout_version=(RelativeLayout)view.findViewById(R.id.layout_version);
        layout_version.setOnClickListener(this);
        layout_about_mrorobot=(RelativeLayout)view.findViewById(R.id.layout_about_mrorobot);
        layout_about_mrorobot.setOnClickListener(this);
        layout_logout=(RelativeLayout)view.findViewById(R.id.layout_logout);
        layout_logout.setOnClickListener(this);
        layout_cleancache=(RelativeLayout)view.findViewById(R.id.layout_cleancache);
        layout_cleancache.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.layout_cruit:
                Intent intentcruit=new Intent(SetFragment.this.getActivity(), RecruitActivity.class);
                startActivity(intentcruit);
                break;
            case R.id.layout_version:


                break;
            case R.id.layout_about_mrorobot:
                Intent intentabout=new Intent(SetFragment.this.getActivity(), AboutMroRobotActivity.class);
                startActivity(intentabout);
                break;
            case R.id.layout_logout:

                break;
            case R.id.layout_cleancache:

                break;
        }

    }
}
